window.loadMonacoFile = new Promise(function (resolve, reject) {
  require(['vs/editor/editor.main'], function () {
    require(['vs/language/typescript/src/monaco.contribution',
      'vs/language/vue/monaco.contribution'
    ], function (t, v) {
      window.monaco.editor.defineTheme('vue', {
        base: 'vs-dark',
        inherit: true,
        rules: [{
          token: 'tag.html',
          foreground: '2973b7'
        }, {
          token: 'attribute.name.html',
          foreground: '2973b7'
        }, {
          token: 'attribute.value.html',
          foreground: '42b983'
        }, {
          token: 'keyword',
          foreground: 'e96900'
        }, {
          token: 'string',
          foreground: '42b983'
        }]
      })
      resolve()
    })
  })
})
